/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2002-2008 Hechzh Property
   Copyright (C) 2016-2018 Hechzh Property

   
*/
/**
 * @file
 * Bi-directional pipe structure
 */

struct btimer_t;

class Bpipe {
 public:
  pid_t worker_pid;
  time_t worker_stime;
  int wait;
  btimer_t* timer_id;
  FILE* rfd;
  FILE* wfd;
};

Bpipe* OpenBpipe(char* prog,
                 int wait,
                 const char* mode,
                 bool dup_stderr = true);
int CloseWpipe(Bpipe* bpipe);
int CloseBpipe(Bpipe* bpipe);
